﻿Public Class Login1
    Inherits System.Web.UI.Page

    Dim oLogin As New Datos.Login

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load

    End Sub

    Protected Sub Button1_Click(ByVal sender As Object, ByVal e As EventArgs) Handles ButtonLogin.Click
        Dim resuLogin As Integer
        resuLogin = oLogin.LoginOK(Me.TextBoxUser.Text, Me.TextBoxPass.Text)
        If resuLogin = 1 Then
            Session.Add("cuit", Me.TextBoxUser.Text)
            Response.Redirect("HoyVerPedidos.aspx")
        Else
            If resuLogin = 2 Then
                Me.Label1.Text = "Usuario no Confirmado Comuniquese con el Administrador"
            Else
                Me.Label1.Text = "Usuario no Registrado."
            End If
        End If

    End Sub
End Class